<template>
  <div class="">Home</div>
  <a-button type="primary">Primary Button</a-button>
  <div @click="store.changeName()" class="no-select">
    {{ store.data.name }}
  </div>
</template>

<script setup lang="ts">
import { onMounted } from "vue";
import { useBaseStore } from "../../store/useBaseStore";

let store = useBaseStore();

onMounted(() => {
  fetch("http://localhost:32068")
    .then((res) => res.text())
    .then((data) => console.log(data));
});
</script>

<style>
/* 禁止整个组件内的文本被选中 */
.no-select {
  -webkit-user-select: none; /* Safari */
  -ms-user-select: none; /* IE 10+ */
  user-select: none; /* Standard */
  cursor: pointer;
}
</style>
